<!-- 帮助 -->
<template>
  <div id="Help">
    <!-- 头部部分 -->
    <Head BackType1="1" title="帮助"></Head>
    <div id="HelpMain">
      <!-- 搜索功能 -->
      <Search placeholder="搜索"></Search>
      <div class="HotHelp">
        <div class="HotHelpTop">
          <div class="HotHelpTitle">热门工具</div>
        </div>
        <div class="HotHelpTextList BoxActive" v-for="(text,index) in HotHelp" :key="index" @click="gotodetail(text.id)">
          <div class="HotHelpTextListBox">
            <div class="HotHelpText overflow">{{text.question}}</div>
            <img src="@/assets/img/ArrowRight.png" alt="">
          </div>
        </div>
      </div>
      <!-- <div class="HotHelp">
        <div class="HotHelpTop">
          <div class="HotHelpTitle">问题类型</div>
        </div>
        <div class="ProblemList">
          <div class="ProblemBox BoxActive" v-for="(Problem,index) in Problems" :key="index">
            <img :src="Problem.src" alt="404" class="ProblemImg">
            <div class="ProblemTent">{{Problem.name}}</div>
          </div>
        </div>
      </div> -->
    </div>
  </div>
</template>

<script>
  import Head from "../components/Head"
  import Search from "../components/Search"
  name:"Install"
  export default {
    data(){
      return{
        page:1,
        pageSize:10,
        // Problems:[
        //   {src:require('@/assets/img/RedEnvelope.png'),name:'零钱红包'},
        //   {src:require('@/assets/img/CloudRedEnvelope.png'),name:'云红包'},
        //   {src:require('@/assets/img/Install.png'),name:'账号设置'},
        //   {src:require('@/assets/img/AddBuddy.png'),name:'添加好友'},
        //   {src:require('@/assets/img/SendAndReceiveMessages.png'),name:'收发消息'},
        //   {src:require('@/assets/img/Chatting.png'),name:'闲聊群聊'},
        //   {src:require('@/assets/img/GroupAides.png'),name:'群助手'},
        //   {src:require('@/assets/img/About.png'),name:'关于闲聊'},
        // ],
        HotHelp:[
          {}
        ]
      }
    },
    components:{
      Head,
      Search,
    },
    mounted(){
      /**
      *  get  请求方式
      *
      */
      let qaIndextext = {
        page:this.page,
        pageSize:this.pageSize,
      }
      this.$get(urlConfig.qaIndex,qaIndextext)
        .then(res => {
          if(res.total == 0 ){

          }else{
            this.HotHelp = res.data.list
          }
      })
    },
    methods:{
      gotodetail(id){
        console.log(id)
        let routeData = this.$router.resolve({path:'HelpDetail',query:
        {
          id: id,
        }});
        window.open(routeData.href, '_blank');
      }
    }
  }
</script>

<style scoped lang="less">
#Help{
  font-size: 28px;
  color: #000;
  #HelpMain{
    width: 750px;
    position: fixed;
    top: 88px;
    overflow: scroll;
    .HotHelp{
      border-top: 1px solid #e5e5e5;
      width: 100%;
      background: #fff;
      &:last-child{
        margin-top: 20px;
      }
      .HotHelpTop{
        height: 90px;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 30px;
        border-bottom: 1px solid #e8e8e8;
        .HotHelpTitle{
          padding-left: 20px;
          font-family: PingFangSC-Medium;
          font-size: 32px;
          border-left: #677ce9 8px solid;
        }
      }
      .HotHelpTextList{
        &:last-child .HotHelpTextListBox{
          border-bottom: 0;
        }
        .HotHelpTextListBox{
          border-bottom: 1px solid #e8e8e8;
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: space-between;
          height: 87px;
          .HotHelpText{
            width: 600px;
          }
          img{
            width: 16px;
            height: 25px;
            margin-right: 30px;
          }
        }
        padding-left: 30px;
        
        
      }
      .ProblemList{
        padding: 10px 40px 10px;
        width: 670px;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        .ProblemBox{
          width: 100px;
          height: 85px;
          padding: 24px 60px;
          // margin: 0 40px;
          border-radius: 10px;
          // background: #f2f3f5;
          display: flex;
          flex-direction: column;
          align-items: center;
          .ProblemImg{
            width: 42px;
            height: 42px;
            padding-bottom: 19px;
          }
          .ProblemTent{
            color: #333;
            font-size: 24px;
          }
        }
      }
    }
  }
}
</style>